package com.ethink.order.api.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author default
 * @version 1.0.0
 * @ClassName PurchaseOrderDetailUpdateRequest.java
 * @Description
 * @createTime 2022年11月08日 15:49:00
 */
@Data
public class PurchaseOrderDetailUpdateRequest {

    @NotNull
    @Schema(description ="主键")
    private Long id;

    @Schema(description ="供应商编码")
    private String supplierCode;

    @Schema(description ="供应商名称")
    private String supplierName;

    @Schema(description ="采购价")
    private BigDecimal purchasePrice;

    @Schema(description ="枚举 付款方式:1-100%预付(t1)|2-先贷后款(t2)|3-分期付款(t3)")
    private Integer payType;

    @Schema(description ="货币编码")
    private String currencyCode;

    @Schema(description ="货币名称")
    private String currencyName;

    @Schema(description ="采购价有效期")
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date priceValidityPeriod;

    @Schema(description ="有效期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd")
    private Date validityPeriod;

    @Schema(description ="可供数量")
    private Integer availableQty;

    @Schema(description ="交货方式")
    private String deliveryWay;

    @Schema(description ="交货地点")
    private String deliveryPlace;

    @Schema(description ="供应商预计交货时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date expectSupplierTime;
}
